﻿<UserControl x:Class="SpringBeansEditor.Editors.BeanEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Height="auto"
             d:DesignHeight="110" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate x:Key="TypeLineItem">
            <Grid>
                <TextBlock Text="{Binding Path=Name}"/>
            </Grid>
        </DataTemplate>

    </UserControl.Resources>
        
        <Grid>
        <StackPanel  Width="auto">
            <StackPanel Orientation="Horizontal"  Width="auto">
                <Label>ID</Label>
                <TextBox Name="IDTxt" Width="239"  />
            </StackPanel>
            <!--
            <StackPanel Orientation="Horizontal"  Width="auto">
                <Label>Name</Label>
                <TextBox Name="NameTxt" Width="222"></TextBox>
            </StackPanel>
            -->
            <StackPanel Orientation="Horizontal"  Width="auto">
                <Label>Type</Label>
                <TextBox Name="TypeTxt" Width="226" 
                         TextChanged="TypeTxt_TextChanged" />
                <TextBox Name="AssemblyTxt" Width="226" 
                         />
            </StackPanel>
            
            <ListBox Name="TypeCmb" MaxHeight="200"
                      ItemTemplate="{StaticResource TypeLineItem}"
                     SelectionChanged="TypeCmb_SelectionChanged"
                      > </ListBox>
            <StackPanel Orientation="Horizontal"  Width="auto">
                <Button Name="SaveBtn" Click="SaveBtn_Click">Save</Button>
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
